package com.lideru.order.controller;

import com.lideru.order.client.TUserClient;
import com.lideru.order.pojo.Order;
import com.lideru.order.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private TUserClient userClient;

    @GetMapping("getOrder")
    public Order getOrder(){
        User user = userClient.getUser();
        Order order = new Order("阿里嘎多美羊羊桑",520,"999",user);
        return order;
    }

}
